﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using App.BaseObject;
using System.ComponentModel.DataAnnotations;

namespace App.Configuration
{
    /// <summary>
    /// 系统设置
    /// </summary>
    public class Setting : AuditedEntity, IMayHaveTenant
    {
        public Setting()
        {
        }

        public Setting(int? tenantId, long? userId, string name, string value)
        {
            UserId = userId;
            TenantId = tenantId;
            Key = name;
            Value = value;
        }

        [StringLength(ColumnSetting.Short)]
        public virtual string Key { get; set; }
        [StringLength(ColumnSetting.Longer)]
        public virtual string Value { get; set; }
        [StringLength(ColumnSetting.Remark)]
        public virtual string Desc { get; set; }

        public virtual long? UserId { get; set; }
        public virtual int? TenantId { get; set; }
    }
}
